//
//  MyAttentionViewController.m
//  ShangHaiTuJI
//
//  Created by xiaoxiangtuji on 2017/8/16.
//  Copyright © 2017年 xiaoxiangtuji. All rights reserved.
//

#import "MyAttentionViewController.h"
#import "MyAttentionListCell.h"
@interface MyAttentionViewController ()<UITableViewDelegate,UITableViewDataSource>

@property(nonatomic,strong)UITableView *tableView;

@end

@implementation MyAttentionViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title = @"我的关注";
    [self createNavagationBackBtn];
    UIImageView *placeImageView = [[UIImageView alloc] init];
    [self.view addSubview:placeImageView];
    placeImageView.image = [UIImage imageNamed:@"attentionzhangwei"];
    [placeImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.view.mas_centerX);
        make.size.mas_equalTo(CGSizeMake(scaleLeftAndRight(185), scaleTopAndBottom(295)));
        make.centerY.equalTo(self.view.mas_centerY).offset(scaleTopAndBottom(10));
    }];
//    [self createTabelveiew];

}
//-(void)createNavagationBackBtn{
//    UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom];
//    backBtn.frame = CGRectMake(0, 6, 67, 23);
//    UIImageView *backImg = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"navigator_btn_back"]];
//    backImg.frame = CGRectMake(-10, 0, 22, 22);
//    [backBtn addSubview:backImg];
//    UILabel *backText = [[UILabel alloc] initWithFrame:CGRectMake(12, 0, 65, 22)];
////    backText.text = @"返回";
//    backText.font = [UIFont systemFontOfSize:17];
//    [backText setBackgroundColor:[UIColor clearColor]];
//    [backText setTextColor:[UIColor whiteColor]];
//    [backBtn addSubview:backText];
//    [backBtn addTarget:self action:@selector(leftBarButtonItemPressed:) forControlEvents:UIControlEventTouchUpInside];
//    [backImg mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.equalTo(backBtn.mas_left).offset(-10);
//        make.centerY.equalTo(backBtn.mas_centerY);
//        make.size.mas_equalTo(CGSizeMake(22, 22));
//    }];
//    [backText mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.left.equalTo(backImg.mas_right).offset(2);
//        make.centerY.equalTo(backBtn.mas_centerY);
//        make.size.mas_equalTo(CGSizeMake(65, 22));
//    }];
//    UIBarButtonItem *leftButton = [[UIBarButtonItem alloc] initWithCustomView:backBtn];
//    [self.navigationItem setLeftBarButtonItem:leftButton];
//}
//-(void)leftBarButtonItemPressed:(UIButton *)btn{
//    [self dismissViewControllerAnimated:YES completion:nil];
//}

-(void)createTabelveiew{
    self.tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 64, WIDTH, HEIGHT - 64) style:UITableViewStylePlain];
    [self.view addSubview:self.tableView];
    self.tableView.dataSource = self;
    self.tableView.delegate = self;
    [self.tableView registerClass:[MyAttentionListCell class] forCellReuseIdentifier:@"MyAttentionListCell"];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    MyAttentionListCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MyAttentionListCell"];
    return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return scaleTopAndBottom(20) * 2 + 50;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
